type Img=string[]|string

function Load(url:string){
	return new Promise((resolve,reject)=>{
		var img=document.createElement('img')
		img.src=url;
		var timer=setTimeout(()=>{
			console.log('加载超时...',url)
			resolve({
				height:null
			})
		},10000)
		img.onload=function(e){
			clearTimeout(timer)
			resolve(e.target)
		}
	})
}

export function LoadImg(img:Img){
	if(typeof img == 'string'){
		alert('srin')
		img=[img]
	}
	var list=img.map((src:string)=>Load(src))
	return Promise.all(list)
}